<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-29 20:36:57
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-29 20:54:55
 */


use yii\helpers\Html;
use common\widgets\MyActiveForm;
use kartik\color\ColorInput;

/* @var $this yii\web\View */
/* @var $model common\addons\diandi_shop\models\GoodsLabel */
/* @var $form yii\widgets\MyActiveForm */
?>
<style>
    .sp-preview {
        margin-right: 0px;
    }
</style>

<div class="goods-label-form">

    <?php $form = MyActiveForm::begin(); ?>

    <?= $form->field($model, 'label')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'color')->widget(ColorInput::classname(), [
        'options' => ['placeholder' => 'Select color ...'],
    ]); ?>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
        </div>
    </div>

    <?php MyActiveForm::end(); ?>

</div>